The background description provided herein is for the purpose of generally presenting the context of the disclosure. Work of the presently named inventors, to the extent the work is described in this background section, as well as aspects of the description that may not otherwise qualify as prior art at the time of filing, are neither expressly nor impliedly admitted as prior art against the present disclosure.
Generally, content addressable memory (CAM) is used in various applications to provide a relatively fast searching capability. In an example, a network device, such as a network switch, a router and the like includes a ternary CAM (TCAM) to store criteria for a plurality of switching rules. In an example, a criterion includes a range requirement that occupies one or more TCAM entries, and addresses of the TCAM entries point to action codes associated with the criterion. When the network device receives a packet, attributes of the packet are extracted to form a search key. The search key is compared with plural TCAM entries, typically comparison of the search key against the plural TCAM entries is performed in a single clock cycle, to find a matching entry from among the TCAM entries. The address of the matching entry points to an action code. According to the action code, the network device takes specified actions on the packet.